package com.axon.lemon

class AvatarController {

    def index() { 
		
	}
	def getAvatar() {
		def placeID = params.placeID
		def place = Place.get(placeID)
		response.outputStream << place.avatar
	}
	def getAvatarUser() {
		def user = UserProfile.get(params.userID)
		response.outputStream << user.avatar
		//<img id='${place.id}' src="${createLink(uri:'/Avatar/getAvatarUser?userID='+place.id)}" width=160px height=140px style="float: right; margin-top:3px;margin-right:10px;margin-left:5px"/>
	}
}

//response.setContentLength(place.avatar.size())
//OutputStream out = response.getOutputStream();
//out.write(place.avatar);
//out.close();